
using System.Collections.Generic;

using Microsoft.Xna.Framework;

using Microsoft.Xna.Framework.Graphics;



namespace Pokemon
{
    /// <summary>
    /// This is a game component that implements IUpdateable.
    /// </summary>
    public abstract class GameScreen
    {
        #region Attribute
        
        protected Texture2D _background;
        
        protected PokemonGame _currGame;
        
        protected ScreenManager _screenManager;
        
        protected List<GameScreen> _screens = new List<GameScreen>();

        protected bool _isStartup = false;

#endregion

        #region Properties

        public GameScreen(Game game)
        {
            _currGame = (PokemonGame) game;            
        }

        public ScreenManager ScreenManager
        {
            get { return _screenManager; }
            set { _screenManager = value; }
        }

        public PokemonGame CurrGame
        {
            get { return _currGame; }
            set { _currGame = value; }
        }

        public List<GameScreen> Screens
        {
            get { return _screens; }
            set { _screens = value; }
        }

#endregion

        #region Load & Unload Content

        public virtual void LoadContent(){}
        
        public virtual void UnloadContent(){}

#endregion

        #region Draw & Update

        public virtual void Update(GameTime gameTime){}

        public virtual void Draw(GameTime gameTime){}

#endregion

        #region Support Method

        public void Add(GameScreen gameScreen)
        {
            _screens.Add(gameScreen);
        }

        public void Exit()
        {
            ScreenManager.Game.Exit();
        }

        public virtual void Startup()
        {
            _isStartup = true;
        }
#endregion
    }
}
